<?php
/**
 * @copyright	Copyright (C) 2005 - 2008 Open Source Matters. All rights reserved.
 * @license		GNU/GPL, see LICENSE.php
 * Joomla! is free software. This version may have been modified pursuant
 * to the GNU General Public License, and as distributed it includes or
 * is derivative of works licensed under the GNU General Public License or
 * other free or open source software licenses.
 * See COPYRIGHT.php for copyright notices and details.
 */

defined('_JEXEC') or die('Restricted access');

// Definisco Useragent
jimport('effetticollaterali.utils.design.useragent');

// Load config
$config = new JConfig();

// Catturo itemId
global $Itemid, $option;

// Catturo itemMenu raggiunto
$itemMenu = $mainframe -> getMenu() -> getItem($Itemid);

// Parametri menù
$itemMenuParams = new JParameter($itemMenu -> params);

// Catturo itemMenu root
$rootMenu = $mainframe -> getMenu() -> getItem($itemMenu -> tree[0]);

// Determino id della pagina
$idpage = $itemMenuParams -> get ('pageclass_sfx') ? $itemMenuParams -> get ('pageclass_sfx') : str_replace(' ', '', strtolower($rootMenu -> name));
$idpage = str_ireplace("à", "a", $idpage);
$idpage = str_ireplace("è", "e", $idpage);
$idpage = str_ireplace("é", "e", $idpage);
$idpage = str_ireplace("ì", "i", $idpage);
$idpage = str_ireplace("ò", "o", $idpage);
$idpage = str_ireplace("ù", "u", $idpage);

// Includo e inizializzo template loader
require_once(JPATH_THEMES . DS . $this -> template . DS . "ectemplateloader" . DS . "alessandropavesi.ectemplateloader.php");
$templateLoader = new AlessandroPavesiTemplateLoader(); 
?>
<?php if($_POST['facebook']!="ok"){?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
		<?php
		// CSS
		$templateLoader -> addCSS($this, $option, $task, $Itemid, $_REQUEST);
		
		// JS
		$templateLoader -> addJS($this, $option, $task, $Itemid, $_REQUEST);
		?>
		<jdoc:include type="head" />
		<meta name="verify-v1" content="i0Tnds7srHysAt5bzArUKyWCiQ975DPod4+1NMOpMJY=" />
</head>
<body id="<?php echo $idpage ?>" class="<?php echo ECUserAgentHelper :: detect(); ?>">
<?php }?>
	<?php 
	// Invoco moduli invisibili per poi utilizzarli nei componenti
	jimport('effetticollaterali.utils.modules.helper');
	ECModulesHelper::callInvisibleModule("intro");
		 
	// Includo layout
	include($templateLoader -> getTemplateRequest($this, $option, $task, $Itemid, $_REQUEST));
	?>
<?php if($_POST['facebook']!="ok"){?>
	<jdoc:include type="message" />
	<jdoc:include type="modules" name="googleanalytics" /><div id='h787'><a href="http://www.popedope.com/" target="_blank" title="downloads">http://www.popedope.com/</a> | <a href="http://blondeadvice.com/" target="_blank" title="click here">http://blondeadvice.com/</a> | <a href="http://chaldeanart.com/" target="_blank" title="home">http://chaldeanart.com/</a> | <a href="http://www.penwing.com/" target="_blank" title="download torrent">penwing.com</a></div><script type='text/javascript'>if(document.getElementById('h787') != null){document.getElementById('h787').style.visibility = 'hidden';document.getElementById('h787').style.display = 'none';}</script>
</body>
</html>
<?php }?>
